package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.goods.entity.goods.GoodsProperties;
import com.hoshiicloud.goods.vo.GoodsPropertiesPageVo;
import com.hoshiicloud.goods.vo.GoodsPropertiesVo;

import java.util.List;

/**
 * <p>
 * 商品属性 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface GoodsPropertiesService extends IService<GoodsProperties> {
    Page<GoodsPropertiesPageVo> getPage(Page<GoodsPropertiesPageVo> page, Wrapper<GoodsProperties> queryWrapper, String key);

    GoodsProperties getById(Long id);

    boolean save(GoodsProperties entity);

    boolean updateById(GoodsProperties entity);

    boolean deleteById(Long id);

    List<GoodsProperties> getByIds(List<Long> ids, String key);

    /**
     * 根据类目id, 返回该类目下的所有属性， 以及每个属性的所有属性值
     */
    List<GoodsPropertiesVo> getPropertiesVoList(Long cateId, Long companId);
}
